@extends('backend.layout')

@section('content')
<table class="table table-striped">
    <thead>
        <tr>
            <th>Nom</th>
            <th>E-mail</th>
            <th>Nom d'utilisateur</th>
            <th>Administrateur</th>
            <th>&nbsp;</th>
        </tr>
    </thead>
    <tbody>
        @foreach ($users as $user)
        <tr>
            <td>{{{ $user->name }}}</td>
            <td>{{{ $user->email }}}</td>
            <td><em>{{{ $user->login }}}</em></td>
            <td><p class="text-center"><span class="glyphicon glyphicon-{{{ $user->is_admin ? 'ok' : 'remove' }}}-circle"></span></p></td>
            <td>
                <a class="btn btn-default btn-xs" href="{{{ url('admin/users/edit', array($user->id)) }}}" role="button"><span class="glyphicon glyphicon-edit"></span></a>
                <a class="btn btn-default btn-xs" href="{{{ url('admin/users/delete', array($user->id)) }}}" role="button"><span class="glyphicon glyphicon-remove"></span></a>
            </td>
        </tr>
        @endforeach
    </tbody>
</table>
<a href="{{ url('admin/users/create') }}" class="btn btn-primary">Ajouter un utilisateur</a>
@stop